home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Development Tools & Languages / Macintosh Common Lisp Related / Lisp FAQ 14Sept94 / 1.Intro&References next >
Encoding:
Internet Message Format  |  1994-09-15  |  72.7 KB  |  [TEXT/ttxt]

  1. Subject: FAQ: Lisp Frequently Asked Questions 1/7 [Monthly posting]
  2. Newsgroups: comp.lang.lisp,news.answers,comp.answers
  3. Summary: Introductory Matter and Bibliography of Introductions and References
  4. Distribution: world
  5. Followup-To: poster
  6. Reply-To: ai+lisp-faq@cs.cmu.edu
  7. Approved: news-answers-request@MIT.Edu
  8.  
  9. Archive-name: lisp-faq/part1
  10. Last-Modified: Wed Sep 14 16:36:28 1994 by Mark Kantrowitz
  11. Version: 1.50
  12. Maintainer: Mark Kantrowitz and Barry Margolin <ai+lisp-faq@cs.cmu.edu>
  13. URL: http://www.cs.cmu.edu:8001/Web/Groups/AI/html/faqs/lang/lisp/top.html
  14. Size: 74423 bytes, 1528 lines
  15.  
  16. ;;; ****************************************************************
  17. ;;; Answers to Frequently Asked Questions about Lisp ***************
  18. ;;; ****************************************************************
  19. ;;; Written by Mark Kantrowitz and Barry Margolin
  20. ;;; lisp_1.faq 
  21.  
  22. This post contains Part 1 of the Lisp FAQ.
  23.  
  24. If you think of questions that are appropriate for this FAQ, or would
  25. like to improve an answer, please send email to us at ai+lisp-faq@cs.cmu.edu.
  26.  
  27. Note that the lisp-faq mailing list is for discussion of the content
  28. of the FAQ posting only.  It is not the place to ask questions about Lisp;
  29. use either the common-lisp@ai.sri.com mailing list or the
  30. comp.lang.lisp newsgroup for that.  If a question appears frequently
  31. in one of those forums, it will get added to the FAQ list.
  32.  
  33. *** Copyright:
  34.  
  35. Copyright (c) 1992-94 by Mark Kantrowitz and Barry Margolin. 
  36. All rights reserved. 
  37.  
  38. This FAQ may be freely redistributed in its entirety without
  39. modification provided that this copyright notice is not removed.  It
  40. may not be sold for profit or incorporated in commercial documents
  41. (e.g., published for sale on CD-ROM, floppy disks, books, magazines,
  42. or other print form) without the prior written permission of the
  43. copyright holder.  Permission is expressly granted for this document
  44. to be made available for file transfer from installations offering
  45. unrestricted anonymous file transfer on the Internet.
  46.  
  47. This article is provided AS IS without any express or implied warranty.
  48.  
  49. *** Topics Covered:
  50.  
  51. There are currently seven parts to the Lisp FAQ:
  52.  
  53.    1. Introductory Matter and Bibliography of Introductions and References
  54.    2. General Questions
  55.    3. Common Programming Pitfalls
  56.    4. Lisp Implementations and Mailing Lists
  57.    5. Object-oriented Programming in Lisp
  58.    6. FTP Archives and Resources
  59.    7. Lisp Window Systems and GUIs
  60.  
  61. All parts are posted to comp.lang.lisp. Part 5 is cross-posted to the
  62. comp.lang.clos newsgroup.  
  63.  
  64. Topics Covered (Part 1):
  65.  
  66.   [1-0]   What is the purpose of this newsgroup?
  67.   [1-1]   What is the difference between Scheme and Common Lisp?
  68.   [1-2]   Lisp books, introductions, documentation, periodicals,
  69.           journals, and conference proceedings. 
  70.   [1-3]   How can I improve my Lisp programming style and coding efficiency?
  71.   [1-4]   Where can I learn about implementing Lisp interpreters and compilers?
  72.   [1-5]   What is the "minimal" set of primitives needed for a Lisp
  73.           interpreter? 
  74.   [1-6]   What does CLOS, PCL, X3J13, CAR, CDR, ... mean? 
  75.   [1-7]   Lisp Job Postings
  76.  
  77. Topics Covered (Part 2):
  78.  
  79.   [2-1]   Is there a GNU-Emacs interface to Lisp?
  80.   [2-2]   When should I use a hash table instead of an association list?
  81.   [2-3]   What is the equivalent of EXPLODE and IMPLODE in Common Lisp?
  82.   [2-4]   Is Lisp inherently slower than more conventional languages such as C?
  83.   [2-5]   Why does Common Lisp have "#'"?
  84.   [2-6]   How do I call non-Lisp functions from Lisp?
  85.   [2-7]   Can I call Lisp functions from other languages?
  86.   [2-8]   I want to call a function in a package that might not exist at
  87.           compile time. How do I do this?  
  88.   [2-9]   What is CDR-coding?
  89.   [2-10]  What is garbage collection?
  90.   [2-11]  How do I save an executable image of my loaded Lisp system?
  91.           How do I run a Unix command in my Lisp?
  92.   [2-12]  I'm porting some code from a Symbolics Lisp machine to some
  93.           other platform, and there are strange characters in the code.
  94.           What do they mean?  
  95.   [2-13]  History: Where did Lisp come from?
  96.   [2-14]  How do I find the argument list of a function?
  97.           How do I get the function name from a function object?
  98.   [2-15]  How can I have two Lisp processes communicate via unix sockets?
  99.   [2-16]  How can I create a stream that acts like UNIX's /dev/null
  100.           (i.e., gobbles any output and immediately signals EOF on
  101.           input operations)?
  102.   [2-17]  Read-time conditionalization of code (#+ #- and *features*)
  103.   [2-18]  What reader macro characters are used in major Lisp systems?
  104.   [2-19]  How do I determine if a file is a directory or not? 
  105.           How do I get the current directory name from within a Lisp 
  106.           program? Is there any way to create a directory?
  107.   [2-20]  What is a "Lisp Machine" (LISPM)?
  108.  
  109. Common Pitfalls (Part 3):
  110.  
  111.   [3-0]  Why does (READ-FROM-STRING "foobar" :START 3) return FOOBAR
  112.          instead of BAR?  
  113.   [3-1]  Why can't it deduce from (READ-FROM-STRING "foobar" :START 3)
  114.          that the intent is to specify the START keyword parameter
  115.          rather than the EOF-ERROR-P and EOF-VALUE optional parameters?   
  116.   [3-2]  Why can't I apply #'AND and #'OR?
  117.   [3-3]  I used a destructive function (e.g. DELETE, SORT), but it
  118.          didn't seem to work.  Why? 
  119.   [3-4]  After I NREVERSE a list, it's only one element long.  After I
  120.          SORT a list, it's missing things.  What happened? 
  121.   [3-5]  Why does (READ-LINE) return "" immediately instead of waiting
  122.          for me to type a line?  
  123.   [3-6]  I typed a form to the read-eval-print loop, but nothing happened. Why?
  124.   [3-7]  DEFMACRO doesn't seem to work.
  125.          When I compile my file, LISP warns me that my macros are undefined
  126.          functions, or complains "Attempt to call <function> which is 
  127.          defined as a macro.
  128.   [3-8]  Name conflict errors are driving me crazy! (EXPORT, packages)
  129.   [3-9]  Closures don't seem to work properly when referring to the
  130.          iteration variable in DOLIST, DOTIMES, DO and LOOP.
  131.   [3-10] What is the difference between FUNCALL and APPLY?
  132.   [3-11] Miscellaneous things to consider when debugging code.
  133.   [3-12] When is it right to use EVAL?
  134.   [3-13] Why does my program's behavior change each time I use it?
  135.   [3-14] When producing formatted output in Lisp, where should you put the
  136.          newlines (e.g., before or after the line, FRESH-LINE vs TERPRI,
  137.          ~& vs ~% in FORMAT)?
  138.   [3-15] I'm using DO to do some iteration, but it doesn't terminate. 
  139.   [3-16] My program works when interpreted but not when compiled!
  140.  
  141. Lisp Implementations and Mailing Lists (Part 4):
  142.  
  143.   [4-0]   Free Common Lisp implementations.
  144.   [4-1]   Commercial Common Lisp implementations.
  145.   [4-1a]  Lisp-to-C translators
  146.   [4-2]   Scheme Implementations
  147.   [4-4]   Free Implementations of Other Lisp Dialects
  148.   [4-5]   Commercial Implementations of Other Lisp Dialects
  149.   [4-6]   What is Dylan?
  150.   [4-7]   What is Pearl Common Lisp?
  151.   [4-9]   What Lisp-related discussion groups and mailing lists exist?
  152.   [4-10]  ANSI Common Lisp -- Where can I get a copy of the draft standard?
  153.  
  154. Object-oriented Programming in Lisp (Part 5):
  155.  
  156.   [5-0]   What is CLOS (PCL) and where can I get it?
  157.           How do you pronounce CLOS? What is the Meta-Object Protocol (MOP)?
  158.   [5-1]   What documentation is available about object-oriented
  159.           programming in Lisp?  
  160.   [5-2]   How do I write a function that can access defstruct slots by
  161.           name?  I would like to write something like 
  162.           (STRUCTURE-SLOT <object> '<slot-name>).   
  163.   [5-3]   How can I list all the CLOS instances in a class?
  164.   [5-4]   How can I store data and CLOS instances (with possibly circular
  165.           references) on disk so that they may be retrieved at some later
  166.           time? (Persistent Object Storage)
  167.   [5-5]   Given the name of a class, how can I get the names of its slots?
  168.   [5-6]   Free CLOS software.
  169.  
  170. FTP Resources (Part 6):
  171.  
  172.   [6-0] General information about FTP Resources for Lisp
  173.   [6-1] Repositories of Lisp Software
  174.   [6-3] Publicly Redistributable Lisp Software
  175.   [6-6] Formatting code in LaTeX (WEB and other literate programming tools)
  176.   [6-7] Where can I get an implementation of Prolog in Lisp?
  177.   [6-8] World-Wide Web (WWW) Resources
  178.  
  179. Lisp Window Systems and GUIs (Part 7):
  180.   [7-1] How can I use the X Window System or other GUIs from Lisp?
  181.   [7-2] What Graphers/Browsers are available?
  182.  
  183. Search for \[#\] to get to question number # quickly.
  184.  
  185. *** Recent Changes:
  186.  
  187. ;;; 1.48:
  188. ;;; 13-JUL-94 mk    Updated Marlais entry in part 4.
  189. ;;; 14-JUL-94 mk    Updated DTP entry in part 6.
  190. ;;; 14-JUL-94 mk    Added entry on Lisp2Wish to part 7.
  191. ;;; 15-JUL-94 mk    Updated WCL entry (version 2.2 for solaris).
  192. ;;; 21-JUL-94 mk    Expanded ILU entry in part 6.
  193. ;;; 22-JUL-94 mk    Updated the Common Lisp Repository entry with information
  194. ;;;                 about the Prime Time Freeware for AI CD-ROM publication,
  195. ;;;                 keyword searching, etc., etc., etc.
  196. ;;; 11-AUG-94 mk    Added ftp site for source code to Graham's "On Lisp" book.
  197. ;;; 12-AUG-94 mk    Lisp-Jobs mailing list has moved.
  198. ;;; 12-AUG-94 mk    Added amiga-lisp mailing list to [4-9].
  199. ;;;
  200. ;;; 1.49:
  201. ;;; 23-AUG-94 mk    Moved the lisp-faq mailing list (for maintenance of the
  202. ;;;                 FAQ) from think.com to ai+lisp-faq@cs.cmu.edu.
  203. ;;;                 FAQ no longer available from ftp.think.com.
  204. ;;; 23-AUG-94 mk    Digital Press is now owned by Butterworth-Heinemann,
  205. ;;;                 and their new address is: 
  206. ;;;                    Digital Press, 80 Montvale Avenue, Stoneham, MA 02180
  207. ;;;                    Tel: 800-366-2665 (617-438-8464), Fax: 617-297-4851.
  208. ;;; 26-AUG-94 mk    Updated ILISP entry in [2-1].
  209. ;;; 26-AUG-94 mk    Added entry on JLISP to [4-4].
  210. ;;; 29-AUG-94 mk    CLtL2 now available by anonymous FTP, courtesy of
  211. ;;;                 Butterworth-Heinemann, the new owners of Digital Press.
  212. ;;; 30-AUG-94 mk    Numbers for Digital Press have changed. They are now      
  213. ;;;                 Tel: 800-366-2665 (USA) or 617-928-2500
  214. ;;;                 Fax: 800-446-6520 (USA) or 617-933-6333
  215. ;;;  8-SEP-94 mk    Corrected expansion for SC22/WG16 in [1-6] glossary.
  216. ;;;
  217. ;;; 1.50:
  218. ;;; 14-SEP-94 mk    Improved IDEAL entry in [6-3].
  219.  
  220.  
  221. *** Introduction:
  222.  
  223. Certain questions and topics come up frequently in the various network
  224. discussion groups devoted to and related to Lisp.  This file/article is
  225. an attempt to gather these questions and their answers into a convenient
  226. reference for Lisp programmers.  It (or a reference to it) is posted
  227. periodically.  The hope is that this will cut down on the user time and
  228. network bandwidth used to post, read and respond to the same questions
  229. over and over, as well as providing education by answering questions
  230. some readers may not even have thought to ask.
  231.  
  232. This is not a Lisp tutorial, nor is it an exhaustive list of all Lisp
  233. intricacies.  Lisp is a very powerful and expressive language, but with
  234. that power comes many complexities.  This list attempts to address the
  235. ones that average Lisp programmers are likely to encounter.  If you are
  236. new to Lisp, see the answer to the question "How can I learn Lisp?".
  237.  
  238. The latest version of this FAQ is available via anonymous FTP from CMU:
  239.  
  240.    To obtain the files from CMU, connect by anonymous FTP to 
  241.       ftp.cs.cmu.edu:/user/ai/pubs/faqs/lisp/  [128.2.206.173]
  242.    using username "anonymous" and password "name@host" (substitute your
  243.    email address) or via AFS in the Andrew File System directory
  244.       /afs/cs.cmu.edu/project/ai-repository/ai/pubs/faqs/lisp/
  245.    and get the files lisp_1.faq, lisp_2.faq, lisp_3.faq, lisp_4.faq,
  246.    lisp_5.faq, lisp_6.faq and lisp_7.faq.
  247.  
  248. You can also obtain a copy of the FAQ by sending a message to
  249. ai+query@cs.cmu.edu with 
  250.    Send Lisp FAQ
  251. in the message body.
  252.  
  253. The FAQ postings are also archived in the periodic posting archive on
  254.    rtfm.mit.edu:/pub/usenet/news.answers/lisp-faq/ [18.181.0.24]
  255. If you do not have anonymous ftp access, you can access the archive by
  256. mail server as well.  Send an E-mail message to
  257. mail-server@rtfm.mit.edu with "help" and "index" in the body on
  258. separate lines for more information.
  259.  
  260. An automatically generated HTML version of the Lisp FAQ is accessible by
  261. WWW as part of the AI-related FAQs Mosaic page. The URL for this
  262. resource is
  263.    http://www.cs.cmu.edu:8001/Web/Groups/AI/html/faqs/top.html
  264. The direct URL for the Lisp FAQ is
  265.    http://www.cs.cmu.edu:8001/Web/Groups/AI/html/faqs/lang/lisp/top.html
  266.  
  267. Unless otherwise specified, the Lisp dialect referred to is Common Lisp,
  268. as defined by "Common Lisp: the Language" (aka "CLtL1") as well as
  269. corrections (but not enhancements) from "Common Lisp: the Language, 2nd
  270. Edition" (aka "CLtL2"), both by Guy L. Steele, Jr. and published by
  271. Digital Press. Note that CLtL2 is NOT an official specification for
  272. the language; ANSI Committee X3J13 is preparing such a specification.
  273. See question [4-10] for information on the status of the ANSI
  274. specification for Common Lisp. Enhancements such as CLOS, conditions,
  275. and the LOOP macro will be referred to separately.
  276.  
  277. If you need to cite the FAQ for some reason, use the following format:
  278.    Mark Kantrowitz and Barry Margolin, "Answers to Frequently Asked
  279.    Questions about Lisp", comp.lang.lisp, <month>, <year>,
  280.    ftp.cs.cmu.edu:/user/ai/pubs/faqs/lisp/lisp_?.faq, ai+lisp-faq@cs.cmu.edu.
  281.  
  282. ----------------------------------------------------------------
  283. Subject: [1-0] What is the purpose of this newsgroup?
  284.  
  285. The newsgroup comp.lang.lisp exists for general discussion of
  286. topics related to the programming language Lisp. For example, possible
  287. topics can include (but are not necessarily limited to):
  288.    announcements of Lisp books and products
  289.    discussion of programs and utilities written in Lisp
  290.    discussion of portability issues
  291.    questions about possible bugs in Lisp implementations
  292.    problems porting an implementation to some architecture
  293. Postings should be of general interest to the Lisp community. See also
  294. question [4-9]. Postings asking for solutions to homework problems are
  295. inappropriate. 
  296.  
  297. Every so often, somebody posts an inflammatory message, such as
  298.    My programming language is better than yours (Lisp vs. C/Prolog/Scheme). 
  299.    Loop (or Series) should/shouldn't be part of the language.
  300. These "religious" issues serve no real purpose other than to waste
  301. bandwidth. If you feel the urge to respond to such a post, please do
  302. so through a private e-mail message. 
  303.  
  304. Questions about object oriented programming in Lisp should be directed
  305. to the newsgroup comp.lang.clos. Similarly, questions about the
  306. programming language Scheme should be directed to the newsgroup
  307. comp.lang.scheme. Discussion of functional programming language issues
  308. should be directed to the newsgroup comp.lang.functional. Discussion
  309. of AI programs implemented in Lisp should sometimes be cross-posted to
  310. the newsgroup comp.ai.
  311.  
  312. ----------------------------------------------------------------
  313. Subject: [1-1] What is the difference between Scheme and Common Lisp?
  314.  
  315. Scheme is a dialect of Lisp that stresses conceptual elegance and
  316. simplicity. It is specified in R4RS and IEEE standard P1178. (See
  317. the Scheme FAQ for details on standards for Scheme.) Scheme is much
  318. smaller than Common Lisp; the specification is about 50 pages,
  319. compared to Common Lisp's 1300 page draft standard. (See question
  320. [4-10] for details on standards for Common Lisp.) Advocates of Scheme
  321. often find it amusing that the Scheme standard is shorter than the
  322. index to CLtL2. 
  323.  
  324. Scheme is often used in computer science curricula and programming
  325. language research, due to its ability to represent many programming
  326. abstractions with its simple primitives. Common Lisp is often used for
  327. real world programming because of its large library of utility
  328. functions, a standard object-oriented programming facility (CLOS), and
  329. a sophisticated condition handling system.
  330.  
  331. See the Scheme FAQ for information about object-oriented programming
  332. in Scheme. 
  333.  
  334. In Common Lisp, a simple program would look something like the
  335. following:
  336.  
  337.    (defun fact (n)
  338.      (if (< n 2)
  339.          1
  340.          (* n (fact (1- n)))))
  341.  
  342. In Scheme, the equivalent program would like like this:
  343.  
  344.    (define fact
  345.      (lambda (n)
  346.        (if (< n 2)
  347.            1
  348.          (* n (fact (- n 1))))))
  349.  
  350. Experienced Lisp programmers might write this program as follows in order
  351. to allow it to run in constant space:
  352.  
  353.    (defun fact (n)
  354.      (labels ((tail-recursive-fact (counter accumulator)
  355.                 (if (> counter n)
  356.                     accumulator
  357.                     (tail-recursive-fact (1+ counter)
  358.                                          (* counter accumulator)))))
  359.        (tail-recursive-fact 1 1)))
  360.  
  361. Whereas in Scheme the same computation could be written as follows:
  362.  
  363.    (define fact
  364.      (lambda (n)
  365.        (letrec ((tail-recursive-fact
  366.                  (lambda (counter accumulator)
  367.                    (if (> counter n)
  368.                        accumulator
  369.                      (tail-recursive-fact (+ counter 1)
  370.                                           (* counter accumulator))))))
  371.                (tail-recursive-fact 1 1))))
  372.  
  373. or perhaps (using IEEE named LETs):
  374.  
  375.    (define fact
  376.      (lambda (n)
  377.        (let loop ((counter n)
  378.                   (accumulator 1))
  379.             (if (< counter 2)
  380.                 accumulator
  381.               (loop (- counter 1)
  382.                     (* accumulator counter))))))
  383.  
  384. Some Schemes allow one to use the syntax (define (fact n) ...) instead
  385. of (define fact (lambda (n) ...)).
  386.  
  387. ----------------------------------------------------------------
  388. Subject: [1-2] Lisp books, introductions, documentation, periodicals,
  389.                journals, and conference proceedings. 
  390.  
  391. There are several good Lisp introductions and tutorials:
  392.  
  393.    1. David S. Touretzky
  394.       "Common Lisp: A Gentle Introduction to Symbolic Computation"
  395.       Benjamin/Cummings Publishers, Redwood City, CA, 1990. 592 pages.
  396.       ISBN 0-8053-0492-4. 
  397.            Perhaps the best tutorial introduction to the language. It has
  398.            clear and correct explanations, and covers some fairly advanced
  399.            topics. The book is an updated Common Lisp version of the 1984
  400.            edition published by Harper and Row Publishers. 
  401.  
  402.            Three free Lisp educational tools which were used in the book --
  403.            Evaltrace, DTRACE and SDRAW -- are available by anonymous ftp from
  404.               b.gp.cs.cmu.edu:/usr/dst/public/lisp/
  405.               b.gp.cs.cmu.edu:/usr/dst/public/evaltrace/
  406.        Evaltrace is a graphical notation for explaining how evaluation
  407.        works and is described in "Visualizing Evaluation in
  408.        Applicative Languages" by David S. Touretzky and Peter Lee,
  409.        CACM 45-59, October 1992. DTRACE is a "detailed trace" which
  410.        provides more information than the tracing tools provided with
  411.        most Common Lisp implementations. SDRAW is a read-eval-draw
  412.        loop that evaluates Lisp expressions and draws the result as a
  413.        cons cell diagram (for both X11 and ascii terminals). Also
  414.        available is PPMX, a tool for pretty printing macro expansions.
  415.  
  416.    2. Robert Wilensky
  417.       "Common LISPcraft"
  418.       W. W. Norton, 1986. 500 pages. ISBN 0-393-95544-3.
  419.  
  420.    3. Wade L. Hennessey 
  421.       "Common Lisp"
  422.       McGraw-Hill, 1989. 395 pages.
  423.            Fairly good, but jumps back and forth from the simple to the
  424.            complex rather quickly, with no clear progression in difficulty.
  425.  
  426.    4. Laurent Siklossy
  427.       "Let's Talk LISP"
  428.       Prentice-Hall, NJ, 1976. 237 pages.
  429.            Good introduction, but quite out of date.
  430.  
  431.    5. Stuart C. Shapiro
  432.       "Common Lisp: An Interactive Approach"
  433.       Computer Science Press/W.H. Freeman, New York, 1992.
  434.       ISBN 0-7167-8218-9
  435.          The errata for the book may be obtained by anonymous ftp from
  436.          ftp.cs.buffalo.edu:/users/shapiro/clerrata.ps
  437.  
  438. Other introductions to Lisp include:
  439.  
  440.    1. A. A. Berk.
  441.       "LISP, The Language of Artificial Intelligence"
  442.       Van Nostrand Reinhold, 1985. 160 pages.
  443.  
  444.    2. Paul Y. Gloess.
  445.       "An Alfred handy guide to Understanding LISP"
  446.       Alfred Publishers (Sherman Oaks, CA), 1982. 64 pages.
  447.  
  448.    3. Ward D. Maurer.
  449.       "The Programmer's Introduction to LISP"
  450.       American Elsevier, 1972. 112 pages.
  451.  
  452.    4. Hank Bromley and Richard Lamson.
  453.       "LISP Lore: A Guide to Programming the LISP Machine"
  454.       Kluwer Academic (Boston), 1987. 337 pages.
  455.  
  456.    5. Sharam Hekmatpour.
  457.       "Introduction to LISP and Symbol Manipulation"
  458.       Prentice Hall (New York), 1988. 303 pages.
  459.  
  460.    6. Deborah G. Tatar
  461.       "A programmer's guide to Common Lisp"
  462.       Digital Press, 1987. 327 pages. ISBN 0-932376-87-8.
  463.            Good introduction on Common Lisp for programmers familiar
  464.            with other programming languages, such as FORTRAN, PASCAL, or C.
  465.  
  466.    7. Timothy Koschmann
  467.       "The Common Lisp Companion"
  468.       John Wiley & Sons, 1990. ISBN 0-471-503-8-8.
  469.            Targeted for those with some programming experience who wish to 
  470.            learn draft-ANSI Common Lisp, including CLOS and the CL condition 
  471.            system. Examples progress incrementally from simple numerical 
  472.            calculation all the way to a logic-programming extension to CL.
  473.   
  474. More advanced introductions to Lisp and its use in Artificial
  475. Intelligence include:
  476.  
  477.    1. Peter Norvig.
  478.       "Paradigms of AI Programming: Case Studies in Common Lisp"
  479.       Morgan Kaufmann, 1992. 946 pages. ISBN 1-55860-191-0. $49.95.
  480.  
  481.         Provides an in-depth exposition of advanced AI programming techniques
  482.         and includes large-scale detailed examples. The book is the most
  483.         advanced AI/Common-Lisp programming text and reference currently
  484.         available, and hence is not for the complete novice.  It focuses on the
  485.         programming techniques necessary for building large AI systems,
  486.         including object-oriented programming, and has a strong performance
  487.         orientation.
  488.  
  489.         The text is marked by its use of "non-toy" examples to illustrate the
  490.         techniques. All of the examples are written in Common Lisp, and copies
  491.         of the source code are available by anonymous ftp from
  492.         unix.sri.com:/pub/norvig and on disk in Macintosh or DOS format from
  493.         the publisher. Some of the techniques described include rule-based
  494.         pattern matching (GPS, Eliza, a subset of Macsyma, the Emycin expert
  495.         system shell), constraint propagation and backtracking (Waltz
  496.         line-labelling), alpha-beta search (Othello), natural language
  497.         processing (top-down, bottom-up and chart parsing), logic-programming
  498.         (unification and Prolog), interpreters and compilers for Scheme, and
  499.         object-oriented programming (CLOS).
  500.  
  501.         The examples are also used to illustrate good programming style and
  502.         efficiency. There is a guide to trouble-shooting and debugging Lisp
  503.         programs, a style guide, and a discussion of portability problems.
  504.         Some of the efficiency techniques described include memoization,
  505.         data indexing, compilation, delaying computation, proper use of
  506.         declarations, avoiding garbage collection, and choosing and using the
  507.         correct data structure.
  508.  
  509.         The book also serves as an advanced introduction to Common Lisp, with
  510.         sections on the Loop macro, CLOS and sequences, and some coverage of 
  511.         error handling, series, and the package facility.
  512.  
  513.    2. Eugene Charniak, Christopher K. Riesbeck, Drew V. McDermott
  514.       and James R. Meehan.
  515.       "Artificial Intelligence Programming", 2nd edition.
  516.       Lawrence Erlbaum Associates (Hillsdale, NJ), 1987. 533 pages.
  517.            Provides many nice code fragments, all of which are written
  518.            in Common Lisp. The first half of the book covers topics
  519.            like macros, the reader, data structures, control structures,
  520.            and defstructs. The second half of the book describes
  521.            programming techniques specific to AI, such as
  522.            discrimination nets, production systems, deductive database
  523.            retrieval, logic programming, and truth maintenance.
  524.  
  525.    3. Patrick H. Winston and Berthold K. P. Horn.
  526.       "LISP", 3rd edition.
  527.       Addison-Wesley (Reading, MA), 1989. 611 pages. ISBN 0-201-08319-1
  528.            Covers the basic concepts of the language, but also gives a lot
  529.            of detail about programming AI topics such as rule-based expert
  530.            systems, forward chaining, interpreting transition trees, 
  531.            compiling transition trees, object oriented programming,
  532.            and finding patterns in images. Not a tutorial. Has many
  533.            good examples. Source code for the examples is available by
  534.            anonymous ftp from ftp.ai.mit.edu:/pub/lisp3/. (The code runs in
  535.            Lucid, Allegro, KCL, GCLisp, MCL, Symbolics Genera. Send mail
  536.            with subject line "help" to ai3@ai.mit.edu for more information.)
  537.  
  538.    4. John R. Anderson, Albert T. Corbett, and Brian J. Reiser.
  539.       "Essential LISP"
  540.       Addison-Wesley (Reading, MA), 1987. 352 pages.
  541.            Concentrates on how to use Lisp with iteration and recursion.
  542.  
  543.    5. Robert D. Cameron and Anthony H. Dixon
  544.       "Symbolic Computing with Lisp"
  545.       Prentice-Hall, 1992, 326 pages. ISBN 0-13-877846-9.
  546.            The book is intended primarily as a third-year computer science
  547.            text. In terms of programming techniques, it emphasizes recursion
  548.            and induction, data abstraction, grammar-based definition of Lisp
  549.            data structures and functional programming style. It uses
  550.            two Lisp languages: 
  551.                 (1) a purely functional subset of Lisp called Small Lisp and
  552.                 (2) Common Lisp.
  553.            An MS-DOS interpreter for Small Lisp (including source) is
  554.            provided with the book.  It considers applications of Lisp
  555.            to formal symbolic data domains: algebraic expressions,
  556.            logical formulas, grammars and programming languages. 
  557.  
  558.    6. Hasemer and Domingue.
  559.       "Common Lisp Programming for Artificial Intelligence"
  560.       Addison-Wesley, 1989.
  561.  
  562.    7. Steven Tanimoto
  563.       "The Elements of Artificial Intelligence: An Introduction Using Lisp"
  564.       Computer Science Press, Rockville, MD, 1987, 530 pages.
  565.  
  566.    8. Patrick R. Harrison
  567.       "Common Lisp and Artificial Intelligence"
  568.       Prentice Hall, Englewood Clifs, NJ, 1990. 244 pages. ISBN 0-13-155243.
  569.  
  570.    9. Paul Graham
  571.       "On Lisp: Advanced Techniques for Common Lisp"
  572.       Prentice Hall, Englewood Clifs, NJ, 1994. 400 pages, ISBN 0-13-030552-9.
  573.          Emphasizes a bottom-up style of writing programs, which he
  574.          claims is natural in Lisp and has advantages over the
  575.          traditional way of writing programs in C and Pascal.
  576.          Also has in-depth sections on writing macros with several
  577.          nice examples. Source code is available by anonymous ftp from
  578.             endor.harvard.edu:/pub/onlisp/ 
  579.          as a single 56kb file.
  580.  
  581. General Lisp reference books include:
  582.  
  583.    1. Guy L. Steele
  584.       "Common Lisp: The Language" [CLtL1]
  585.       Digital Press, 1984. 465 pages. ISBN 0-932376-41-X.
  586.  
  587.    2. Guy L. Steele
  588.       "Common Lisp: The Language, 2nd Edition" [CLtL2]
  589.       Digital Press, 1990. 1029 pages, ISBN 1-55558-041-6 paperbound ($39.95).
  590.  
  591.       [Butterworth-Heinemann, the owners of Digital Press, have made
  592.        the LaTeX sources to this book available by anonymous FTP from
  593.           cambridge.apple.com:/pub/CLTL/ 
  594.        A copy of the distribution is also available from
  595.           ftp.cs.cmu.edu:/user/ai/lang/lisp/doc/cltl/
  596.        The paperbound version of the book is, of course, available at
  597.        fine bookstores, or contact them directly at Digital Press, 
  598.        80 Montvale Avenue, Stoneham, MA 02180, call 800-366-2665
  599.        (617-928-2500), or fax 800-446-6520 (617-933-6333). A copy of
  600.        the Digital Press book catalog is available from the same FTP location.]
  601.  
  602.        A html version, produces using latex2html on the latex sources,
  603.        is accessible via the URL:
  604.            http://www.dcs.gla.ac.uk/~alison/clm/clm.html
  605.  
  606.    3. Franz Inc. 
  607.       "Common Lisp: The Reference"
  608.       Addison-Wesley, Reading, MA 1988. ISBN 0-201-11458-5
  609.            Entries on Lisp (CLtL1) functions in alphabetical order.
  610.  
  611. Lisp periodicals include:
  612.         
  613.    1. LISP Pointers.
  614.       Published by ACM SIGPLAN six times a year. Volume 1, Number 1
  615.       was April-May 1987. 
  616.       Subscriptions: ACM Members $12; ACM Student Members $7; Non-ACM
  617.       members $25. Mail checks payable to the ACM to ACM Inc., PO Box
  618.       12115, Church Street Station, New York, NY 10249.
  619.  
  620.    2. LISP and Symbolic Computation, Kluwer Academic Press. Volume 1
  621.       was published in 1989. (jlz@lucid.com is the editor).  ISSN 0892-4635.
  622.       Subscriptions: Institutions $169; Individuals $80. Add $8 for
  623.       air mail. Kluwer Academic Publishers, PO Box 322, 3300 AH Dordrecht, 
  624.       The Netherlands, or Kluwer Academic Publishers, PO Box 358, Accord
  625.       Station, Hingham, MA 02018-0358. 
  626.  
  627.       A full table of contents of all published issues, aims and scope, and
  628.       instructions for authors are available by anonymous ftp from
  629.          ftp.std.com:/Kluwer/journals/
  630.       as the files lisp.toc and lisp.inf.
  631.  
  632.    3. Proceedings of the biannual ACM Lisp and Functional Programming
  633.       Conference. (First one was in 1980.)
  634.  
  635.    4. Proceedings of the annual Lisp Users and Vendors Conference.
  636.  
  637. Implementation-specific questions:
  638.  
  639.    1. Lucid. See the wizards.doc file that comes with the Lucid
  640.       release. It describes functions, macros, variables and constants that
  641.       are not official parts of the product and are not supported.
  642.       Constructs described in this file include: the interrupt facility, the
  643.       source file recording facility, the resource facility, multitasking,
  644.       writing your own streams, lisp pipes, i/o buffers, the compiler,
  645.       floating-point functions, memory management, debugger information, the
  646.       window tool kit, extensions to the editor, the foreign function
  647.       interface, clos information, delivery toolkit information, and Lucid
  648.       lisp training classes. The wizards.doc file also covers i/o
  649.       constructs, functions for dealing with DEFSTRUCT, functions and
  650.       constants for dealing with procedure objects, functions and constants
  651.       for dealing with code objects, function for mapping objects,
  652.       additional keyword argument to DISKSAVE, function used in the
  653.       implementation of arrays, function for monitor-specific behavior for a
  654.       process, additional keyword argument to RUN-PROGRAM, and load-time
  655.       evaluation.
  656.  
  657. Many books on Scheme are worth reading even if you use Common Lisp,
  658. because many of the issues are similar. Scheme is a simpler language
  659. to learn, so it is often used in introductory computer science
  660. classes.  See the Scheme FAQ for a list of introductions and
  661. references for Scheme. The two key introductions are Abelson and
  662. Sussman's "Structure and Interpretation of Computer Programs" and 
  663. Friedman and Felleisen's "The Little LISPer". 
  664.  
  665. Special Topics:
  666.  
  667.    Garbage Collection:
  668.  
  669.       Wilson, Paul R., "Uniprocessor Garbage Collection Techniques"
  670.       Proceedings of the 1992 International Workshop on Memory Management.
  671.       Springer Lecture Notes #637. Surveys garbage collection techniques. 
  672.       Includes an excellent bibliography. Available by anonymous ftp from
  673.          cs.utexas.edu:/pub/garbage/gcsurvey.ps.
  674.       The BibTeX format of the bibliography is also available in this
  675.       directory, along with several other papers. Contact wilson@cs.utexas.edu
  676.       for more info.
  677.  
  678. ----------------------------------------------------------------
  679. Subject: [1-3] How can I improve my Lisp programming style and 
  680.                coding efficiency?
  681.  
  682. There are several books about Lisp programming style, including:
  683.    
  684.    1. Molly M. Miller and Eric Benson
  685.       "Lisp Style and Design"
  686.       Digital Press, 1990. 214 pages. ISBN 1-55558-044-0.
  687.            How to write large Lisp programs and improve Lisp programming 
  688.            style. Uses the development of Lucid CL as an example. 
  689.  
  690.    2. Robin Jones, Clive Maynard, and Ian Stewart.
  691.       "The Art of Lisp Programming"
  692.       Springer-Verlag, 1989. 169 pages.
  693.  
  694.    3. W. Richard Stark.
  695.       "LISP, Lore, and Logic: An Algebraic View of LISP
  696.        Programming, Foundations, and Applications"
  697.       Springer-Verlag, 1990. 278 pages. ISBN 0-387-97072-X paper ($42).
  698.            Self-modifying code, self-reproducing programs, etc.
  699.  
  700.    4. CMU CL User's Manual, Chapter 7, (talks about writing
  701.       efficient code). It is available by anonymous ftp from any CMU CS 
  702.       machine (e.g., ftp.cs.cmu.edu [128.2.206.173]) as the file
  703.         /afs/cs.cmu.edu/project/clisp/docs/cmu-user/cmu-user.ps 
  704.       [when getting this file by anonymous ftp, one must cd to 
  705.       the directory in one atomic operation, as some of the superior
  706.       directories on the path are protected from access by anonymous ftp.]
  707.  
  708.    5. See also Norvig's book, SICP (Abelson & Sussman), SAP
  709.       (Springer and Friedman).
  710.  
  711.    6. Hallvard Tretteberg's Lisp Style Guide is available by anonymous
  712.       ftp in ftp.think.com:/public/think/lisp/style-guide.text. There is
  713.       a fair bit of overlap between Hallvard's style guide and the notes
  714.       below and in part 3 of this FAQ.
  715.  
  716.    7. Rajeev Sangal
  717.       "Programming Paradigms in Lisp"
  718.       McGraw-Hill, 1991. ISBN 0-07-054666-5.
  719.  
  720.    8. Rodney A. Brooks.
  721.       "Programming in Common Lisp"
  722.       John Wiley & Sons, New York, 1985. 303 pages. ISBN 0-471-81888-7.
  723.       Chapter 5 discusses Lisp programming style.
  724.  
  725. Here are some general suggestions/notes about improving Lisp
  726. programming style, readability, correctness and efficiency:
  727.  
  728.    General Programming Style Rules:
  729.  
  730.       - Write short functions, where each function provides a single,
  731.         well-defined operation. Small functions are easier to
  732.         read, write, test, debug, and understand.
  733.  
  734.       - Use descriptive variable and function names. If it isn't clear
  735.         from the name of a function or variable what its purpose is,
  736.         document it with a documentation string and a comment. In fact,
  737.         even if the purpose is evident from the name, it is still worth
  738.         documenting your code.
  739.  
  740.       - Don't write Pascal (or C) code in Lisp. Use the appropriate
  741.         predefined functions -- look in the index to CLtL2, or use the
  742.         APROPOS and DESCRIBE functions. Don't put a close parenthesis
  743.         on a line by itself -- this can really aggravate programmers
  744.         who grew up on Lisp. Lisp-oriented text editors include tools
  745.         for ensuring balanced parentheses and for moving across 
  746.         pairs of balanced parentheses. You don't need to stick
  747.         comments on close parentheses to mark which expression they close.
  748.  
  749.       - Use proper indentation -- you should be able to understand
  750.         the structure of your definitions without noticing the parentheses. 
  751.         In general, the way one indents a form is controlled by the
  752.         first symbol of the form. In DEFUNs, for example, one puts the
  753.         symbol DEFUN, the function name, and the argument list all on
  754.         the same line. If the argument list is too long, one can break
  755.         it at one of the lambda keywords. Following the argument list,
  756.         one inserts a carriage return and lists the expressions in the
  757.         body of the definition, with each form starting on its own
  758.         line indented three spaces relative to the open parenthesis of
  759.         the parent (in this case the DEFUN). This general style -- of
  760.         putting all the significant elements of a form on a single
  761.         line, followed by a carriage return and the indented body --
  762.         holds for many Lisp constructs. There are, of course, variations,
  763.         such as keeping the first clause on the same line as the COND
  764.         or CASE symbol, and the rules are relaxed in different ways to
  765.         keep line lengths to a manageable size. If you find yourself having
  766.         trouble fitting everything in even with line breaking and
  767.         relaxing the rules, either your function names are too long or your
  768.         code isn't very modular. You should perceive this as a signal that
  769.         you need to break up your big definitions into smaller chunks, each
  770.         with a clearly defined purpose, and possibly replace long function
  771.         names with concise but apt shorter ones.
  772.  
  773.       - Use whitespace appropriately. Use whitespace to separate
  774.         semantically distinct code segments, but don't use too much
  775.         whitespace. For example,
  776.            GOOD: 
  777.               (defun foo (x y)
  778.                 (let ((z (+ x y 10)))
  779.                   (* z z)))
  780.  
  781.            BAD: 
  782.               (defun foo(x y)(let((z(+ x y 10)))(* z z)))
  783.  
  784.               (defun foo ( x  y )
  785.                 (let ( ( z (+ x y 10) ) )
  786.                   ( * z z )
  787.                   )
  788.                 )    
  789.          Although the Lisp reader and compiler don't care which you
  790.          use, most experienced Lisp programs find the first example much easier
  791.          to read than the last two.
  792.  
  793.        - Don't use line lengths greater than 80 characters. People who
  794.          write code using Zmacs on Symbolics Lisp Machines are notoriously
  795.          guilty of violating this rule, because the CPT6 font allows
  796.          one to squeeze a tremendous amount of code on the display,
  797.          especially if one spreads the code out horizontally. This
  798.          makes it more difficult to read when printed out or read on
  799.          an 80x24 xterm window. In fact, use a line length of 72 characters
  800.          because it leaves a strip of white space at the edge of the window.
  801.  
  802.    The following functions often abused or misunderstood by novices. 
  803.    Think twice before using any of these functions.
  804.  
  805.       - EVAL. Novices almost always misuse EVAL. When experts use
  806.         EVAL, they often would be better off using APPLY, FUNCALL, or
  807.         SYMBOL-VALUE. Use of EVAL when defining a macro should set off
  808.         a warning bell -- macro definitions are already evaluated
  809.         during expansion. See also the answer to question 3-12.
  810.         The general rule of thumb about EVAL is: if you think you need
  811.         to use EVAL, you're probably wrong.
  812.  
  813.       - PROGV. PROGV binds dynamic variables and is often misused in
  814.         conjunction with EVAL, which uses the dynamic environment. 
  815.         In general, avoid unnecessary use of special variables.
  816.         PROGV is mainly for writing interpreters for languages embedded
  817.         in Lisp. If you want to bind a list of values to a list of
  818.         lexical variables, use
  819.             (MULTIPLE-VALUE-BIND (..) (VALUES-LIST ..) ..)
  820.         or
  821.             (MULTIPLE-VALUE-SETQ (..) (VALUES-LIST ..))
  822.         instead. Most decent compilers can optimize this expression. 
  823.         However, use of this idiom is not to be encouraged unless absolutely
  824.         necessary.
  825.  
  826.       - CATCH and THROW. Often a named BLOCK and RETURN-FROM are
  827.         more appropriate. Use UNWIND-PROTECT when necessary.
  828.  
  829.       - Destructive operations, such as NCONC, SORT, DELETE,
  830.         RPLACA, and RPLACD, should be used carefully and sparingly.
  831.         In general, trust the garbage collector: allocate new
  832.         data structures when you need them.
  833.  
  834.    To improve the readability of your code,
  835.  
  836.       - Don't use any C{A,D}R functions with more than two
  837.         letters between the C and the R. When nested, they become
  838.         hard to read. If you have complex data structures, you
  839.         are often better off describing them with a DEFSTRUCT,
  840.         even if the type is LIST. The data abstraction afforded by
  841.         DEFSTRUCT makes the code much more readable and its purpose
  842.         clearer. If you must use C{A,D}R, try to use
  843.         DESTRUCTURING-BIND instead, or at least SECOND, THIRD, 
  844.         NTH, NTHCDR, etc.
  845.  
  846.       - Use COND instead of IF and PROGN. In general, don't use PROGN if
  847.         there is a way to write the code within an implicit
  848.         PROGN. For example, 
  849.            (IF (FOO X)
  850.                (PROGN (PRINT "hi there") 23)
  851.                34)
  852.         should be written using COND instead.
  853.  
  854.       - Never use a 2-argument IF or a 3-argument IF with a second
  855.         argument of NIL unless you want to emphasize the return value;
  856.         use WHEN and UNLESS instead. You will want to emphasize the
  857.         return value when the IF clause is embedded within a SETQ,
  858.         such as (SETQ X (IF (EQ Y Z) 2 NIL)). If the second argument 
  859.         to IF is the same as the first, use OR instead: (OR P Q) rather
  860.         than (IF P P Q). Use UNLESS instead of (WHEN (NOT ..) ..)
  861.         but not instead of (WHEN (NULL ..) ..).
  862.  
  863.       - Use COND instead of nested IF statements. Be sure to check for
  864.         unreachable cases, and eliminate those cond-clauses.
  865.  
  866.       - Use backquote, rather than explicit calls to LIST, CONS, and
  867.         APPEND, whenever writing a form which produces a Lisp form, but
  868.         not as a general substitute for LIST, CONS and APPEND. LIST, 
  869.         CONS and APPEND usually allocate new storage, but lists produced
  870.         by backquote may involve destructive modification (e.g., ,.).
  871.  
  872.       - Make the names of special (global) variables begin and end
  873.         with an asterisk (*): (DEFVAR *GLOBAL-VARIABLE*)   
  874.         Some programmers will mark the beginning and end of an internal
  875.         global variable with a percent (%) or a period (.).
  876.         Make the names of constants begin and end with a plus (+):
  877.         (DEFCONSTANT +E+ 2.7182818)
  878.         This helps distinguish them from lexical variables. Some people
  879.         prefer to use macros to define constants, since this avoids
  880.         the problem of accidentally trying to bind a symbol declared
  881.         with defconstant.
  882.  
  883.       - If your program is built upon an underlying substrate which is
  884.         implementation-dependent, consider naming those functions and
  885.         macros in a way that visually identifies them, either by placing
  886.         them in their own package, or prepending a character like a %, ., 
  887.         or ! to the function name. Note that many programmers use the
  888.         $ as a macro character for slot access, so it should be avoided
  889.         unless you're using it for that purpose.
  890.  
  891.       - Don't use property lists. Instead, use an explicit hash table.
  892.         This helps avoid problems caused by the symbol being in the wrong
  893.         package, accidental reuse of property keys from other
  894.         programs, and allows you to customize the structure of the table. 
  895.  
  896.       - Use the most specific construct that does the job. This lets
  897.         readers of the code see what you intended when writing the code.
  898.         For example, don't use SETF if SETQ will do (e.g., for lexical
  899.         variables). Use the most specific predicate to test your conditions.
  900.         If you intend for a function to be a predicate, have it return T
  901.         for true, not just non-NIL. 
  902.  
  903.       - When NIL is used as an empty list, use () in your code. When NIL
  904.         is used as a boolean, use NIL. Similarly, use NULL to test for an
  905.         empty list, NOT to test a logical value. Use ENDP to test for the
  906.         end of a list, not NULL.
  907.  
  908.       - Don't use the &AUX lambda-list keyword. It is always clearer to
  909.         define local variables using LET or LET*.
  910.  
  911.       - When using RETURN and RETURN-FROM to exit from a block, don't
  912.         use (VALUES ..) when returning only one value, except if you
  913.         are using it to suppress extra multiple values from the first
  914.         argument. 
  915.  
  916.       - If you want a function to return no values (i.e., equivalent to
  917.         VOID in C), use (VALUES) to return zero values. This signals
  918.         to the reader that the function is used mainly for side-effects.
  919.  
  920.       - (VALUES (VALUES 1 2 3)) returns only the first value, 1.
  921.         You can use (VALUES (some-multiple-value-function ..)) to suppress
  922.         the extra multiple values from the function. Use MULTIPLE-VALUE-PROG1
  923.         instead of PROG1 when the multiple values are significant.
  924.  
  925.       - When using MULTIPLE-VALUE-BIND and DESTRUCTURING-BIND, don't rely
  926.         on the fact that NIL is used when values are missing. This is
  927.         an error in some implementations of DESTRUCTURING-BIND. Instead,
  928.         make sure that your function always returns the proper number of
  929.         values.
  930.  
  931.       - Type the name of external symbols, functions, and variables
  932.         from the COMMON-LISP package in uppercase. This will allow your
  933.         code to work properly in a case-sensitive version of Common Lisp,
  934.         since the print-names of symbols in the COMMON-LISP package
  935.         are uppercase internally. (However, not everybody feels that
  936.         being nice to case-sensitive Lisps is a requirement, so this
  937.         isn't an absolute style rule, just a suggestion.)
  938.  
  939.     Lisp Idioms:
  940.  
  941.       - MAPCAN is used with a function to return a variable number of
  942.         items to be included in an output list. When the function returns zero
  943.         or one items, the function serves as a filter. For example,
  944.            (mapcan #'(lambda (x) (when (and (numberp x) (evenp x)) (list x)))
  945.                    '(1 2 3 4 x 5 y 6 z 7))
  946.  
  947.     Documentation:
  948.  
  949.       - Comment your code. Use three semicolons in the left margin before
  950.         the definition for major explanations. Use two semicolons that
  951.         float with the code to explain the routine that follows. Two
  952.         semicolons may also be used to explain the following line when the
  953.         comment is too long for the single semicolon treatment. Use
  954.         a single semicolon to the right of the code to explain a particular
  955.         line with a short comment. The number of semicolons used roughly
  956.         corresponds with the length of the comment. Put at least one blank
  957.         line before and after top-level expressions.
  958.  
  959.       - Include documentation strings in your code. This lets users
  960.         get help while running your program without having to resort to
  961.         the source code or printed documentation. 
  962.  
  963.    Issues related to macros:
  964.  
  965.       - Never use a macro instead of a function for efficiency reasons.
  966.         Declaim the function as inline -- for example, 
  967.           (DECLAIM (INLINE ..))
  968.         This is *not* a magic bullet -- be forewarned that inline
  969.         expansions can often increase the code size dramatically. INLINE
  970.         should be used only for short functions where the tradeoff is
  971.         likely to be worthwhile: inner loops, types that the compiler
  972.         might do something smart with, and so on.
  973.  
  974.       - When defining a macro that provides an implicit PROGN, use the
  975.         &BODY lambda-list keyword instead of &REST.
  976.  
  977.       - Use gensyms for bindings within a macro, unless the macro lets
  978.         the user explicitly specify the variable. For example:
  979.             (defmacro foo ((iter-var list) body-form &body body)
  980.               (let ((result (gensym "RESULT")))
  981.                 `(let ((,result nil))
  982.                    (dolist (,iter-var ,list ,result)
  983.                      (setq ,result ,body-form)
  984.                      (when ,result
  985.                         ,@body)))))        
  986.         This avoids errors caused by collisions during macro expansion
  987.         between variable names used in the macro definition and in the
  988.         supplied body.
  989.  
  990.       - Use a DO- prefix in the name of a macro that does some kind of
  991.         iteration, WITH- when the macro establishes bindings, and
  992.         DEFINE- or DEF- when the macro creates some definitions. Don't
  993.         use the prefix MAP- in macro names, only in function names.
  994.  
  995.       - Don't create a new iteration macro when an existing function
  996.         or macro will do.
  997.  
  998.       - Don't define a macro where a function definition will work just
  999.         as well -- remember, you can FUNCALL or MAPCAR a function but 
  1000.         not a macro.
  1001.  
  1002.       - The LOOP and SERIES macros generate efficient code. If you're
  1003.         writing a new iteration macro, consider learning to use one
  1004.         of them instead.
  1005.   
  1006.    File Modularization:
  1007.  
  1008.       - If your program involves macros that are used in more than one
  1009.         file, it is generally a good idea to put such macros in a separate
  1010.         file that gets loaded before the other files. The same things applies
  1011.         to primitive functions. If a macro is complicated, the code that
  1012.         defines the macro should be put into a file by itself. In general, if
  1013.         a set of definitions form a cohesive and "independent" whole, they
  1014.         should be put in a file by themselves, and maybe even in their own
  1015.         package. It isn't unusual for a large Lisp program to have files named
  1016.         "site-dependent-code", "primitives.lisp", and "macros.lisp". If a file
  1017.         contains primarily macros, put "-macros" in the name of the file.
  1018.  
  1019.    Stylistic preferences:
  1020.  
  1021.       - Use (SETF (CAR ..) ..) and (SETF (CDR ..) ..) in preference to
  1022.         RPLACA and RPLACD. Likewise (SETF (GET ..) ..) instead of PUT.
  1023.  
  1024.       - Use INCF, DECF, PUSH and POP instead instead of the corresponding
  1025.         SETF forms.
  1026.  
  1027.       - Many programmers religiously avoid using CATCH, THROW, BLOCK,
  1028.         PROG, GO and TAGBODY.  Tags and go-forms should only be necessary
  1029.         to create extremely unusual and complicated iteration constructs. In
  1030.         almost every circumstance, a ready-made iteration construct or
  1031.         recursive implementation is more appropriate.
  1032.  
  1033.       - Don't use LET* where LET will do. Don't use LABELS where FLET
  1034.         will do. Don't use DO* where DO will do.
  1035.  
  1036.       - Don't use DO where DOTIMES or DOLIST will do.
  1037.  
  1038.       - If you like using MAPCAR instead of DO/DOLIST, use MAPC when
  1039.         no result is needed -- it's more efficient, since it doesn't
  1040.         cons up a list. If a single cumulative value is required, use
  1041.         REDUCE. If you are seeking a particular element, use FIND,
  1042.         POSITION, or MEMBER.
  1043.  
  1044.       - If using REMOVE and DELETE to filter a sequence, don't use the
  1045.         :test-not keyword or the REMOVE-IF-NOT or DELETE-IF-NOT functions.
  1046.         Use COMPLEMENT to complement the predicate and the REMOVE-IF
  1047.         or DELETE-IF functions instead.
  1048.  
  1049.       - Use complex numbers to represent points in a plane.
  1050.  
  1051.       - Don't use lists where vectors are more appropriate. Accessing the
  1052.         nth element of a vector is faster than finding the nth element
  1053.         of a list, since the latter requires pointer chasing while the
  1054.         former requires simple addition. Vectors also take up less space
  1055.         than lists. Use adjustable vectors with fill-pointers to
  1056.         implement a stack, instead of a list -- using a list continually
  1057.         conses and then throws away the conses.
  1058.  
  1059.       - When adding an entry to an association list, use ACONS, not
  1060.         two calls to CONS. This makes it clear that you're using an alist.
  1061.  
  1062.       - If your association list has more than about 10 entries in it,
  1063.         consider using a hash table. Hash tables are often more efficient.
  1064.         (See also [2-2].)
  1065.  
  1066.       - When you don't need the full power of CLOS, consider using
  1067.         structures instead. They are often faster, take up less space, and
  1068.         easier to use.
  1069.  
  1070.       - Use PRINT-UNREADABLE-OBJECT when writing a print-function.
  1071.  
  1072.       - Use WITH-OPEN-FILE instead of OPEN and CLOSE.
  1073.  
  1074.       - When a HANDLER-CASE clause is executed, the stack has already
  1075.         unwound, so dynamic bindings that existed when the error
  1076.         occured may no longer exist when the handler is run. Use
  1077.         HANDLER-BIND if you need this. 
  1078.  
  1079.       - When using CASE and TYPECASE forms, if you intend for the form
  1080.         to return NIL when all cases fail, include an explicit OTHERWISE
  1081.         clause. If it would be an error to return NIL when all cases
  1082.         fail, use ECASE, CCASE, ETYPECASE or CTYPECASE instead.
  1083.  
  1084.       - Use local variables in preference to global variables whenever
  1085.         possible. Do not use global variables in lieu of parameter passing.
  1086.         Global variables can be used in the following circumstances:
  1087.           *  When one function needs to affect the operation of
  1088.              another, but the second function isn't called by the first.
  1089.              (For example, *load-pathname* and *break-on-warnings*.)
  1090.           *  When a called function needs to affect the current or future
  1091.              operation of the caller, but it doesn't make sense to accomplish
  1092.              this by returning multiple values.
  1093.           *  To provide hooks into the mechanisms of the program.
  1094.              (For example, *evalhook*, *, /, and +.)
  1095.           *  Parameters which, when their value is changed, represent a
  1096.              major change to the program.
  1097.              (For example, *print-level* and *print-readably*.)
  1098.           *  For state that persists between invocations of the program.
  1099.              Also, for state which is used by more than one major program.
  1100.              (For example, *package*, *readtable*, *gensym-counter*.)
  1101.           *  To provide convenient information to the user.
  1102.              (For example, *version* and *features*.)
  1103.           *  To provide customizable defaults. 
  1104.              (For example, *default-pathname-defaults*.)
  1105.           *  When a value affects major portions of a program, and passing
  1106.              this value around would be extremely awkward. (The example
  1107.              here is output and input streams for a program. Even when
  1108.              the program passes the stream around as an argument, if you
  1109.              want to redirect all output from the program to a different
  1110.              stream, it is much easier to just rebind the global variable.)
  1111.  
  1112.       - Beginning students, especially ones accustomed to programming
  1113.         in C, Pascal, or Fortran, tend to use global variables to hold or pass
  1114.         information in their programs. This style is considered ugly by
  1115.         experienced Lisp programmers. Although assignment statements can't
  1116.         always be avoided in production code, good programmers take advantage
  1117.         of Lisp's functional programming style before resorting to SETF and
  1118.         SETQ. For example, they will nest function calls instead of using a
  1119.         temporary variable and use the stack to pass multiple values. When
  1120.         first learning to program in Lisp, try to avoid SETF/SETQ and their
  1121.         cousins as much as possible. And if a temporary variable is necessary,
  1122.         bind it to its first value in a LET statement, instead of letting it
  1123.         become a global variable by default. (If you see lots of compiler
  1124.         warnings about declaring variables to be special, you're probably
  1125.         making this mistake. If you intend a variable to be global, it should
  1126.         be defined with a DEFVAR or DEFPARAMETER statement, not left to the
  1127.         compiler to fix.)
  1128.  
  1129.    Correctness and efficiency issues:
  1130.  
  1131.       - In CLtL2, IN-PACKAGE does not evaluate its argument. Use defpackage
  1132.         to define a package and declare the external (exported)
  1133.         symbols from the package. 
  1134.  
  1135.       - The ARRAY-TOTAL-SIZE-LIMIT may be as small as 1024, and the
  1136.         CALL-ARGUMENTS-LIMIT may be as small as 50. 
  1137.  
  1138.       - Novices often mistakenly quote the conditions of a CASE form.
  1139.         For example, (case x ('a 3) ..) is incorrect. It would return
  1140.         3 if x were the symbol QUOTE. Use (case x (a 3) ..) instead.
  1141.  
  1142.       - Avoid using APPLY to flatten lists. Although 
  1143.            (apply #'append list-of-lists)
  1144.         may look like a call with only two arguments, it becomes a 
  1145.         function call to APPEND, with the LIST-OF-LISTS spread into actual
  1146.         arguments. As a result it will have as many arguments as there are
  1147.         elements in LIST-OF-LISTS, and hence may run into problems with the
  1148.         CALL-ARGUMENTS-LIMIT. Use REDUCE or MAPCAN instead:  
  1149.            (reduce #'append list-of-lists :from-end t)
  1150.            (mapcan #'copy-list list-of-lists)
  1151.         The second will often be more efficient (see note below about choosing
  1152.         the right algorithm). Beware of calls like (apply f (mapcar ..)).
  1153.  
  1154.       - NTH must cdr down the list to reach the elements you are
  1155.         interested in. If you don't need the structural flexibility of
  1156.         lists, try using vectors and the ELT function instead.
  1157.  
  1158.       - CASE statements can be vectorized if the keys are consecutive
  1159.         numbers. Such CASE statements can still have OTHERWISE clauses.
  1160.         To take advantage of this without losing readability, use #. with 
  1161.         symbolic constants:
  1162.  
  1163.             (eval-when (compile load eval)
  1164.                (defconstant RED 1)
  1165.                (defconstant GREEN 2)
  1166.                (defconstant BLUE 3))
  1167.  
  1168.             (case color
  1169.               (#.RED   ...)
  1170.               (#.GREEN ...)
  1171.               (#.BLUE  ...)
  1172.               ...)
  1173.  
  1174.       - Don't use quoted constants where you might later destructively
  1175.         modify them. For example, instead of writing '(c d) in
  1176.            (defun foo ()
  1177.              (let ((var '(c d)))
  1178.                ..))
  1179.         write (list 'c 'd) instead. Using a quote here can lead to
  1180.         unexpected results later. If you later destructively modify the 
  1181.         value of var, this is self-modifying code! Some Lisp compilers
  1182.         will complain about this, since they like to make constants
  1183.         read-only. Modifying constants has undefined results in ANSI CL.
  1184.         See also the answer to question [3-13].
  1185.  
  1186.         Similarly, beware of shared list structure arising from the use
  1187.         of backquote. Any sublist in a backquoted expression that doesn't
  1188.         contain any commas can share with the original source structure.
  1189.  
  1190.       - Don't proclaim unsafe optimizations, such as
  1191.            (proclaim '(optimize (safety 0) (speed 3) (space 1))) 
  1192.         since this yields a global effect. Instead, add the
  1193.         optimizations as local declarations to small pieces of
  1194.         well-tested, performance-critical code:
  1195.            (defun well-tested-function ()
  1196.               (declare (optimize (safety 0) (speed 3) (space 1)))
  1197.              ..)
  1198.         Such optimizations can remove run-time type-checking; type-checking
  1199.         is necessary unless you've very carefully checked your code
  1200.         and added all the appropriate type declarations.
  1201.  
  1202.       - Some programmers feel that you shouldn't add declarations to
  1203.         code until it is fully debugged, because incorrect
  1204.         declarations can be an annoying source of errors. They recommend
  1205.         using CHECK-TYPE liberally instead while you are developing the code.
  1206.         On the other hand, if you add declarations to tell the
  1207.         compiler what you think your code is doing, the compiler can
  1208.         then tell you when your assumptions are incorrect.
  1209.         Declarations also make it easier for another programmer to read
  1210.         your code. 
  1211.  
  1212.       - Declaring the type of variables to be FIXNUM does not
  1213.         necessarily mean that the results of arithmetic involving the 
  1214.         fixnums will be a fixnum; it could be a BIGNUM. For example,
  1215.            (declare (type fixnum x y))
  1216.            (setq z (+ (* x x) (* y y)))
  1217.         could result in z being a BIGNUM. If you know the limits of your
  1218.         numbers, use a declaration like
  1219.            (declare (type (integer 0 100) x y))
  1220.         instead, since most compilers can then do the appropriate type
  1221.         inference, leading to much faster code.
  1222.  
  1223.       - Don't change the compiler optimization with an OPTIMIZE
  1224.         proclamation or declaration until the code is fully debugged
  1225.         and profiled.  When first writing code you should say 
  1226.         (declare (optimize (safety 3))) regardless of the speed setting.
  1227.  
  1228.       - Depending on the optimization level of the compiler, type
  1229.         declarations are interpreted either as (1) a guarantee from
  1230.         you that the variable is always bound to values of that type,
  1231.         or (2) a desire that the compiler check that the variable is
  1232.         always bound to values of that type. Use CHECK-TYPE if (2) is
  1233.         your intention.
  1234.  
  1235.       - If you get warnings about unused variables, add IGNORE
  1236.         declarations if appropriate or fix the problem. Letting such
  1237.         warnings stand is a sloppy coding practice.
  1238.  
  1239.    To produce efficient code,
  1240.  
  1241.       - choose the right algorithm. For example, consider seven possible
  1242.         implementations of COPY-LIST:
  1243.  
  1244.            (defun copy-list (list)
  1245.              (let ((result nil))
  1246.                (dolist (item list result)
  1247.                  (setf result (append result (list item))))))
  1248.  
  1249.            (defun copy-list (list)
  1250.              (let ((result nil))
  1251.                (dolist (item list (nreverse result))
  1252.                  (push item result))))
  1253.  
  1254.            (defun copy-list (list)
  1255.              (mapcar #'identity list))
  1256.  
  1257.            (defun copy-list (list)
  1258.              (let ((result (make-list (length list))))
  1259.                (do ((original list (cdr original))
  1260.                     (new result (cdr new)))
  1261.                    ((null original) result)
  1262.                  (setf (car new) (car original)))))
  1263.  
  1264.            (defun copy-list (list)
  1265.              (when list
  1266.                (let* ((result (list (car list)))
  1267.                       (tail-ptr result))
  1268.                  (dolist (item (cdr list) result)
  1269.                    (setf (cdr tail-ptr) (list item))
  1270.                    (setf tail-ptr (cdr tail-ptr))))))
  1271.         
  1272.             (defun copy-list (list)
  1273.               (loop for item in list collect item))
  1274.  
  1275.             (defun copy-list (list)
  1276.               (if (consp list) 
  1277.                   (cons (car list)
  1278.                         (copy-list (cdr list)))
  1279.                   list))
  1280.  
  1281.         The first uses APPEND to tack the elements onto the end of the list.
  1282.         Since APPEND must traverse the entire partial list at each step, this
  1283.         yields a quadratic running time for the algorithm.  The second
  1284.         implementation improves on this by iterating down the list twice; once
  1285.         to build up the list in reverse order, and the second time to reverse
  1286.         it. The efficiency of the third depends on the Lisp implementation,
  1287.         but it is usually similar to the second, as is the fourth.  The fifth
  1288.         algorithm, however, iterates down the list only once. It avoids the
  1289.         extra work by keeping a pointer (reference) to the last cons of the 
  1290.         list and RPLACDing onto the end of that. Use of the fifth algorithm 
  1291.         may yield a speedup. Note that this contradicts the earlier dictum to
  1292.         avoid destructive functions. To make more efficient code one might
  1293.         selectively introduce destructive operations in critical sections of
  1294.         code. Nevertheless, the fifth implementation may be less efficient in
  1295.         Lisps with cdr-coding, since it is more expensive to RPLACD cdr-coded
  1296.         lists. Depending on the implementation of nreverse, however,
  1297.         the fifth and second implementations may be doing the same
  1298.         amount of work. The sixth example uses the Loop macro, which usually
  1299.         expands into code similar to the third. The seventh example copies
  1300.         dotted lists, and runs in linear time, but isn't tail-recursive. 
  1301.  
  1302.       - use type declarations liberally in time-critical code, but
  1303.         only if you are a seasoned Lisp programmer. Appropriate type
  1304.         declarations help the compiler generate more specific and
  1305.         optimized code. It also lets the reader know what assumptions
  1306.         were made. For example, if you only use fixnum arithmetic,
  1307.         adding declarations can lead to a significant speedup. If you
  1308.         are a novice Lisp programmer, you should use type declarations
  1309.         sparingly, as there may be no checking to see if the
  1310.         declarations are correct, and optimized code can be harder to
  1311.         debug. Wrong declarations can lead to errors in otherwise
  1312.         correct code, and can limit the reuse of code in other
  1313.         contexts. Depending on the Lisp compiler, it may also 
  1314.         be necessary to declare the type of results using THE, since
  1315.         some compilers don't deduce the result type from the inputs.
  1316.  
  1317.       - check the code produced by the compiler by using the
  1318.         disassemble function
  1319.  
  1320. ----------------------------------------------------------------
  1321. Subject: [1-4] Where can I learn about implementing Lisp interpreters 
  1322.                and compilers?
  1323.  
  1324. Books about Lisp implementation include:
  1325.  
  1326.    1. John Allen
  1327.       "Anatomy of Lisp"
  1328.       McGraw-Hill, 1978. 446 pages. ISBN 0-07-001115-X
  1329.            Discusses some of the fundamental issues involved in
  1330.            the implemention of Lisp.  
  1331.  
  1332.    2. Samuel Kamin
  1333.       "Programming Languages, An Interpreter-Based Approach"
  1334.       Addison-Wesley, Reading, Mass., 1990. ISBN 0-201-06824-9
  1335.            Includes sources to several interpreters for Lisp-like
  1336.            languages, and a pointer to sources via anonymous ftp.
  1337.       Tim Budd reimplemented the interpreters in C++, and has made
  1338.       them available by anonymous ftp from cs.orst.edu:/pub/budd/kamin/
  1339.  
  1340.    3. Sharam Hekmatpour
  1341.       "Lisp: A Portable Implementation"
  1342.       Prentice Hall, 1985. ISBN 0-13-537490-X.
  1343.            Describes a portable implementation of a small dynamic
  1344.            Lisp interpreter (including C source code). 
  1345.  
  1346.    4. Peter Henderson
  1347.       "Functional Programming: Application and Implementation"
  1348.       Prentice-Hall (Englewood Cliffs, NJ), 1980. 355 pages.
  1349.  
  1350.    5. Peter M. Kogge
  1351.       "The Architecture of Symbolic Computers"
  1352.       McGraw-Hill, 1991. ISBN 0-07-035596-7.
  1353.            Includes sections on memory management, the SECD and
  1354.            Warren Abstract Machines, and overviews of the various
  1355.            Lisp Machine architectures.
  1356.    
  1357.    6. Daniel P. Friedman, Mitchell Wand, and Christopher T. Haynes
  1358.       "Essentials of Programming Languages"
  1359.       MIT Press, 1992, 536 pages. ISBN 0-262-06145-7.
  1360.            Teaches fundamental concepts of programming language
  1361.            design by using small interpreters as examples. Covers
  1362.            most of the features of Scheme. Includes a discussion
  1363.            of parameter passing techniques, object oriented languages,
  1364.            and techniques for transforming interpreters to allow
  1365.            their implementation in terms of any low-level language.
  1366.            Also discusses scanners, parsers, and the derivation of
  1367.            a compiler and virtual machine from an interpreter.
  1368.            Includes a few chapters on converting code into a
  1369.            continuation passing style.
  1370.            Source files available by anonymous ftp from 
  1371.               cs.indiana.edu:/pub/eopl/ [129.79.254.191].
  1372.  
  1373.    7. Peter Lee, editor, "Topics in Advanced Language Implementation",
  1374.       The MIT Press, Cambridge, Mass., 1991.
  1375.            Articles relevant to the implementation of functional
  1376.            programming languages.
  1377.  
  1378.    8. Also see the proceedings of the biannual ACM Lisp and Functional
  1379.       Programming conferences, the implementation notes for CMU Common Lisp,
  1380.       Norvig's book, and SICP (Abelson & Sussman).
  1381.  
  1382. ----------------------------------------------------------------
  1383. Subject: [1-5] What is the "minimal" set of primitives needed for a Lisp
  1384.                interpreter? 
  1385.  
  1386. Many Lisp functions can be defined in terms of other Lisp functions.
  1387. For example, CAAR can be defined in terms of CAR as
  1388.    (defun caar (list) (car (car list)))
  1389. It is then natural to ask whether there is a "minimal" or smallest set
  1390. of primitives necessary to implement the language. 
  1391.  
  1392. There is no single "best" minimal set of primitives; it all depends on
  1393. the implementation. For example, even something as basic as numbers
  1394. need not be primitive, and can be represented as lists. One possible
  1395. set of primitives might include CAR, CDR, and CONS for manipulation of
  1396. S-expressions, READ and PRINT for the input/output of S-expressions
  1397. and APPLY and EVAL for the guts of an interpreter.  But then you might
  1398. want to add LAMBDA for functions, EQ for equality, COND for
  1399. conditionals, SET for assignment, and DEFUN for definitions. QUOTE
  1400. might come in handy as well. If you add more specialized datatypes,
  1401. such as integers, floats, arrays, characters, and structures, you'll
  1402. need to add primitives to construct and access each.
  1403.  
  1404. AWKLisp is a Lisp interpreter written in awk, available by anonymous
  1405. ftp from ftp.cs.cmu.edu:/user/ai/lang/lisp/impl/awk/. It has thirteen
  1406. built-in functions: CAR, CDR, CONS, EQ, ATOM, SET, EVAL, ERROR, QUOTE,
  1407. COND, AND, OR, LIST. 
  1408.  
  1409. A more practical notion of a "minimal" set of primitives might be to
  1410. look at the implementation of Scheme. While many Scheme functions can
  1411. be derived from others, the language is much smaller than Common Lisp.
  1412. See Dybvig's PhD thesis, 
  1413.    R. Kent Dybvig, "Three Implementation Models for Scheme", Department
  1414.    of Computer Science Technical Report #87-011, University of North
  1415.    Carolina at Chapel Hill, Chapel Hill, North Carolina, April 1987.
  1416. for a justification of a particularly practical minimal set of
  1417. primitives for Scheme.
  1418.  
  1419. In a language like Common Lisp, however, there are a lot of low-level
  1420. primitive functions that cannot be written in terms of the others,
  1421. such as GET-UNIVERSAL-TIME, READ-CHAR, WRITE-CHAR, OPEN, and CLOSE,
  1422. for starters.  Moreover, real Common Lisp implementations are often
  1423. built upon primitives that aren't part of the language, per se, and
  1424. certainly not intended to be user-accessible, such as SYS:%POINTER-REF.
  1425.  
  1426. Beside the references listed in [1-4], some other relevant references
  1427. include:  
  1428.  
  1429.     McCarthy, John, "Recursive Functions of Symbolic Expressions and
  1430.     their Computation by Machine, Part I", CACM 3(4):185-195, April 1960.
  1431.        [Defines five elementary functions on s-expressions.]
  1432.  
  1433.     McCarthy, John, "A Micro-Manual for Lisp -- not the whole Truth",
  1434.     ACM SIGPLAN Notices, 13(8):215-216, August 1978.
  1435.        [Defines the Lisp programming language in 10 rules and gives
  1436.         a small interpreter (eval) written in this Lisp.]
  1437.  
  1438.     McCarthy, John, et al., "LISP 1.5 Programmer's Manual", 2nd edition,
  1439.     MIT Press, 1965, ISBN 0-262-13011-4 (paperback).  
  1440.        [Gives five basic functions, CAR, CDR, CONS, EQ, and ATOM.
  1441.         Using composition, conditional expressions (COND), and
  1442.         recursion, LAMBDA, and QUOTE, these basic functions may be used
  1443.         to construct the entire class of computable functions of
  1444.         S-expressions. Gives the functions EVAL and APPLY in
  1445.         M-expression syntax.] 
  1446.  
  1447.     Abelson and Sussman's SICP, especially chapters 4 and 5 on the
  1448.     implementation of meta-circular and explicit-control evaluators.
  1449.  
  1450.     Steele and Gabriel's "The Evolution of LISP".
  1451.  
  1452. ----------------------------------------------------------------
  1453. Subject: [1-6]  What does CLOS, PCL, X3J13, CAR, CDR, ... mean? 
  1454.  
  1455. Glossary of acronyms:
  1456.    CAR             Originally meant "Contents of Address portion of Register",
  1457.                    which is what CAR actually did on the IBM 704.
  1458.    CDR             Originally meant "Contents of Decrement portion of 
  1459.                    Register", which is what CDR actually did
  1460.                    on the IBM 704. Pronounced "Cudder" /kUdd@r/ (as in "a cow
  1461.                    chews its cdr"). The first syllable is pronounced
  1462.                    like "could". 
  1463.    LISP            Originally from "LISt Processing"
  1464.    GUI             Graphical User Interface
  1465.    CLOS            Common Lisp Object System. The object oriented
  1466.                    programming standard for Common Lisp. Based on
  1467.                    Symbolics FLAVORS and Xerox LOOPS, among others.
  1468.                    Pronounced either as "See-Loss" or "Closs". See also PCL.
  1469.    PCL             Portable Common Loops. A portable CLOS implementation.
  1470.                    Available by anonymous ftp from parcftp.xerox.com:pcl/.
  1471.    LOOPS           Lisp Object Oriented Programming System. A predecessor
  1472.                    to CLOS on Xerox Lisp machines.
  1473.    X3J13           Subcommittee of the ANSI committee X3 which is
  1474.                    working on the ANSI Standardization of Common Lisp.
  1475.    ANSI            American National Standards Institute
  1476.    dpANS           draft proposed American National Standard (what an ANS
  1477.                    is called while it's in the public review stage of
  1478.                    standardization).
  1479.    CL              Common Lisp
  1480.    SC22/WG16       The full name is ISO/IEC JTC 1/SC 22/WG 16. It stands
  1481.                    for International Organization for Standardization/
  1482.                    International Electrotechnical Commission, Joint
  1483.                    Technical Committee 1 Subcommittee 22 (full name
  1484.                    "Information Technology -- Programming Languages
  1485.                    and their Environments"), Working Group 16.  This
  1486.                    long-winded name is the ISO working group working
  1487.                    on an international Lisp standard, (i.e., the ISO
  1488.                    analogue to X3J13). 
  1489.    CLtL1           First edition of Guy Steele's book, 
  1490.                    "Common Lisp the Language". 
  1491.    CLtL2           Second edition of Guy Steele's book,
  1492.                    "Common Lisp the Language". 
  1493.  
  1494. ----------------------------------------------------------------
  1495. Subject: [1-7] Lisp Job Postings
  1496.  
  1497. The LISP-JOBS mailing list exists to help programmers find Lisp
  1498. programming positions, and to help companies with Lisp programming
  1499. positions find capable Lisp programmers. (Lisp here means Lisp-like
  1500. languages, including Scheme.)
  1501.  
  1502. Material appropriate for the list includes Lisp job announcements and
  1503. should be sent to ai+lisp-jobs@cs.cmu.edu. Resumes should NOT be sent to
  1504. the list. 
  1505.  
  1506. [Note: The 'ai+' part of the mailing list name is used for directing
  1507. submissions to the appropriate mail-server. The list is NOT restricted
  1508. to AI-related Lisp jobs -- all Lisp job announcements are welcome.]
  1509.  
  1510. As a matter of policy, the contents of this mailing list is
  1511. considered confidential and will not be disclosed to anybody.
  1512.  
  1513. To subscribe, send a message to ai+query@cs.cmu.edu with
  1514.    subscribe lisp-jobs <First Name> <Last Name>, <Affiliation/Organization>
  1515. in the message body. 
  1516.  
  1517. (If your mailer objects to the "+", send subscription requests to
  1518. "ai+query"@cs.cmu.edu, job announcements to "ai+lisp-jobs"@cs.cmu.edu, etc.)  
  1519.  
  1520. For help on using the query server, send mail to ai+query@cs.cmu.edu with
  1521.    help
  1522. in the message body.
  1523.  
  1524. If you have any other questions, please send them to ai+@cs.cmu.edu
  1525.  
  1526. ----------------------------------------------------------------
  1527.  
  1528. ;;; *EOF*
  1529.